home *** CD-ROM | disk | FTP | other *** search
/ Commodore 64 Scene Diskmags Assortment / Uptime_The_Disk_Monthly_V1_07_19xx_Uptime_staff_Side_B.d64 / credit card mgr. (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  11KB  |  336 lines

  1. 10 rem    credit card filer
  2. 25 rem    by mike cooke
  3. 40 rem    (c) 1987
  4. 55 rem    published by:
  5. 70 rem    viking technologies, inc.
  6. 85 rem
  7. 100 ifl=0thenl=1:open15,8,15,"i0":close15:load"0:lptr rtn",8,1
  8. 110 sys 65418:poke 808,234
  9. 115 clr:printchr$(8);chr$(14):up$=chr$(17)
  10. 120 poke 53269,0
  11. 130 nc=0:dimc$(26,4)
  12. 145 poke53280,0:poke53281,0
  13. 150 print"[147]"
  14. 260 v=53248:gt=14335
  15. 265 fort=1to256:reada:pokegt+t,a:nextt:poke2040,224:poke2041,225
  16. 280 poke2042,226:poke2043,227:pokev+41,6:pokev+42,6:pokev+39,8:pokev+40,8
  17. 295 pokev+28,15:pokev+37,1:pokev+38,7:pokev+16,12
  18. 310 pokev,47:pokev+2,71:pokev+4,9:pokev+6,33:pokev+1,68:pokev+3,68:pokev+5,68
  19. 325 pokev+7,68:pokev+21,15
  20. 326 print"[147][155]                                       "
  21. 327 print" [146]                                      [146]"
  22. 328 print" [146]                                      [146]"
  23. 329 print" [146]          [154][195]redit [195]ard [198]iler[155]           [146]"
  24. 330 print" [146]                                      [146]"
  25. 331 print" [146][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164] [146]"
  26. 332 print"      [208]ress [198]8 to [210]eturn to [213]p[212]ime     ":print
  27. 340 print"[159]         [215]ritten by [205]ike [195]ooke"
  28. 355 print"          (c) [195]opyright 1987"
  29. 370 print" [208]ublished by [214]iking [212]echnologies, [201]nc."
  30. 385 print"[152]     [196]o you want instructions? ";
  31. 390 poke 198,0
  32. 400 geta$:ifa$="[140]"then4360
  33. 415 ifa$="y"thenprint"[155][217]es":goto610
  34. 430 ifa$="n"thenprint"[155][206]o":goto1090
  35. 445 goto400
  36. 460 rem   *** clear space ***
  37. 475 print""
  38. 490 z=0:forz=1to16:print"                                       ":nextz
  39. 505 print""
  40. 520 return
  41. 535 rem   *** press spacebar ***
  42. 550 print"       [208]ress [150]<[211][208][193][195][197]> to [195]ontinue"
  43. 565 geta$:ifa$="[140]"then4360
  44. 580 ifa$<>chr$(32)then565
  45. 595 return
  46. 610 rem   *** instructions ***
  47. 625 gosub460:print"[152]    [212]his program's purpose is to store"
  48. 640 print"up to 25 different sets of credit card"
  49. 655 print"information. [198]or each card, the program"
  50. 670 print"will store its name, number, exp date,"
  51. 685 print"and a phone number to call if you were"
  52. 700 print"to lose the card.  [201]f you were to lose"
  53. 715 print"your cards, you would have easy access"
  54. 730 print"to the information you would need to"
  55. 745 print"tell the credit card company."
  56. 760 print:gosub535:gosub460
  57. 775 print"[152]     [212]o put a card into the file, you"
  58. 790 print"would pick the first menu choose-add a"
  59. 805 print"card.  [201]f you ever want to erase"
  60. 820 print"the information on a card, you would"
  61. 835 print"choose the the appropriate menu choice."
  62. 850 print"[155][193]lways 'save' the file before"
  63. 865 print"exiting if you have made changes in"
  64. 880 print"the file.  [152][201]f you don't, the changes"
  65. 895 print"will not be recorded."
  66. 910 print:gosub535:gosub460
  67. 925 print"[152]     [201]n the first part of the program"
  68. 940 print"you will be asked if this a new or an"
  69. 955 print"old file.  [206]ew files are ones that have"
  70. 970 print"no data.  [217]ou would choose this the"
  71. 985 print"first time you run the program.  [207]ld"
  72. 1000 print"files are those with data in them you"
  73. 1015 print"want to change or add to.  [201]f you say"
  74. 1030 print"that you want a new file after you have"
  75. 1045 print"already made a file, the first one will"
  76. 1060 print"be erased and a new one set up.":print:gosub535:gosub460
  77. 1061 print"[152]    [212]he final menu choice, [208]rint [204]etter"
  78. 1062 print"is used when you lose a credit card and"
  79. 1063 print"you need to send a written request for"
  80. 1064 print"new credits cards.  [217]ou are ask for"
  81. 1065 print"additional information to put in the"
  82. 1066 print"letter and you should reply in the"
  83. 1067 print"following format.":gosub535:gosub460
  84. 1068 print"[152]  [206][193][205][197]:     [155][205]ichael [211]. [195]ooke"
  85. 1069 print" [152] [193][204][212] [206][193][205][197]: [155][211]ondra [204]. [195]ooke"
  86. 1070 print"  ([213]sed with more than one card holder)"
  87. 1071 print"  [152][193][196][196][210][197][211][211]:[155]  [208][207] [194]ox 100"
  88. 1072 print"                   or"
  89. 1073 print"            801 [204]akeshore [196]r."
  90. 1074 print"  [152][195][201][212][217]: [155][211]elma  [152][211][212][193][212][197]: [155][207][210]  [152][218][201][208]: [155]97538"
  91. 1075 print"  [152][196][193][212][197]:     [155][193]ugust 13, 1987"
  92. 1076 print"  [152][208][200][207][206][197] #:  [155](503) 597-1212"
  93. 1089 gosub535:gosub460:goto340
  94. 1090 rem   *** old/new file ***
  95. 1105 print"[152]     [201]s this a [155][206][152]ew or [155][207][152]ld file?    [157][157][157]";
  96. 1120 geta$:ifa$="[140]"then4360
  97. 1135 ifa$="n"thenprint"[155][206]ew":goto1180
  98. 1150 ifa$="o"thenprint"[155][207]ld":goto1420
  99. 1165 goto1120
  100. 1180 print"     [193]re you sure?    [157][157][157]";
  101. 1195 geta$:ifa$="[140]"then4360
  102. 1210 ifa$="y"thenprint"[217]es":goto1255
  103. 1225 ifa$="n"thenprint"[206]o[145][145][145][145]":goto1105
  104. 1240 goto1195
  105. 1255 rem   *** new file ***
  106. 1270 open15,8,15,"i0":open1,8,2,"@0:-ccm data,s,w":input#15,a:ifa<20then1360
  107. 1285 print"[145][145][152][196][201][211][203] [197][210][210][207][210]!!!  [208]lease check your drive":close1:close15
  108. 1300 print"and press space."
  109. 1315 geta$:ifa$=""then1315
  110. 1330 print"[145][145][145]":fort=1to2
  111. 1345 print"                                       ":nextt:print"[145]":goto1270
  112. 1360 print"[152]     [195]reating file..."
  113. 1375 print#1,0:close1:close15:fort=1to500:nextt
  114. 1390 goto1555
  115. 1405 rem   *** old file ***
  116. 1420 open15,8,15,"i0":open1,8,2,"0:-ccm data,s,r":input#15,a$:ifa$<"20"then1510
  117. 1435 print"[152][196][201][211][203] [197][210][210][207][210]!!!  [208]lease check your drive":close1:close15
  118. 1450 print"and press space."
  119. 1465 geta$:ifa$=""then1465
  120. 1480 print"[145][145][145]":fort=1to2
  121. 1495 print"                                       ":nextt:print"[145][145][145][145][145][145]":goto1105
  122. 1510 print"     [204]oading data...":input#1,nc$:nc=val(nc$):if nc>26 then nc=26
  123. 1525 fort=1tonc:fory=1to4:input#1,c$(t,y):nexty,t
  124. 1540 close1:close15
  125. 1555 rem *** main menu ***
  126. 1570 gosub460:print"[155]           [195]hoose by [206]umber:":print
  127. 1585 print"             [155]1)[152] [193]dd card":print
  128. 1600 print"             [155]2)[152] [197]rase card":print
  129. 1615 print"             [155]3)[152] [211]ave file":print
  130. 1630 print"             [155]4)[152] [214]iew cards":print:printtab(13)"[155]5)[152] [208]rint [204]etter"
  131. 1645 print:print"            [155][198]8)[152] [197]xit to [213]p[212]ime":print
  132. 1660 print"[155]           [195]hoice:";
  133. 1675 geta$:ifa$="[140]"then4360
  134. 1690 a=val(a$):ifa<1ora>5then1675
  135. 1705 printa;"  ([217]/[206])? ";
  136. 1720 geta$:ifa$=""then1720
  137. 1735 ifa$="y"thenprint"[217]es":goto1780
  138. 1750 ifa$<>"n"then1720
  139. 1765 print"[206]o":print"[145]                                       [145]":goto1660
  140. 1780 onagosub1810,2065,2455,2725,3475
  141. 1795 goto1555
  142. 1810 rem   *** add card ***
  143. 1825 gosub460:printtab(13)" [159][193]dd a [195]ard"
  144. 1840 ifnc=15thenprint:print"[155]      [206]o more cards may be added.":gosub535:return
  145. 1855 print:print:nc=nc+1
  146. 1870 print:print"      [152][195]ard name:[155] ";
  147. 1885 gosub3355:c$(nc,1)=a$
  148. 1887 if a$="" then c$(nc,1)="*"
  149. 1900 print:print"      [152][206]umber:[155] ";
  150. 1915 gosub3355:c$(nc,2)=a$
  151. 1920 if a$="" then c$(nc,2)="*"
  152. 1930 print:print"      [152][197]xp date: [155]";
  153. 1945 gosub3355:c$(nc,3)=a$
  154. 1950 if a$="" then c$(nc,3)="*"
  155. 1960 print:print"      [152][212]elephone #: [155]";
  156. 1975 gosub3355:c$(nc,4)=a$
  157. 1980 if a$="" then c$(nc,4)="*"
  158. 1990 print:printtab(13)" [159][193]dd another?"
  159. 2005 geta$:ifa$=""then2005
  160. 2020 ifa$="y"then1810
  161. 2035 ifa$="n"thenreturn
  162. 2050 goto2005
  163. 2065 rem   *** erase card ***
  164. 2080 gosub460:printtab(13)"[159][197]rase a [195]ard"
  165. 2095 ifnc=0thenprint:print"[152]      [212]here are no cards to erase.":gosub535:return
  166. 2110 print:print"[152][213]se the up/down cursor key to scroll"
  167. 2125 print"the cards.  [208]ress '[197]' to erase a card."
  168. 2140 print"press '[210]' to return to the menu."
  169. 2155 print:print
  170. 2170 c=1
  171. 2185 print"[155]";c$(c,1);"[152] - ";c$(c,2):print
  172. 2200 printtab(len(c$(c,1)));"   ";c$(c,3);" ";c$(c,4)
  173. 2215 print"[195]ommand:"
  174. 2230 geta$:ifa$=""then2230
  175. 2245 ifa$="r"thenreturn
  176. 2260 ifa$="[145]"andc<ncthenc=c+1:goto2425
  177. 2275 ifa$=""andc>1thenc=c-1:goto2425
  178. 2290 ifa$<>"e"then2230
  179. 2305 print"[155][197]rase for sure? "
  180. 2320 geta$:ifa$=""then2320
  181. 2335 ifa$="y"thenprint"[145]                [145]":goto2380
  182. 2350 ifa$<>"n"then2320
  183. 2365 print"[145]                [145]":goto2230
  184. 2380 fort=ctonc:c$(t,1)=c$(t+1,1):c$(t,2)=c$(t+1,2):c$(t,3)=c$(t+1,3)
  185. 2395 c$(t,4)=c$(t+1,4):nextt:nc=nc-1:ifnc=0thenreturn
  186. 2410 c=1
  187. 2425 print"[145][145][145][145][145][145][145]":fort=1to3
  188. 2440 print"                                       ":nextt:print"[145][145][145][145]":goto2185
  189. 2455 rem   *** save file ***
  190. 2470 gosub460:printtab(13)"[154][211]ave [198]ile"
  191. 2485 print:print"[152][208]ress [155][211][152] to save or [155][210][152] to return to"
  192. 2500 print"the menu.":print"([211]/[210]):[155] ";
  193. 2515 geta$:ifa$=""then2515
  194. 2530 ifa$="s"thenprint"[211]aving...":goto2575
  195. 2545 ifa$="r"thenprint"[210]eturn":fort=1to250:nextt:return
  196. 2560 goto2515
  197. 2575 open15,8,15:open1,8,1,"@0:-ccm data,s,w"
  198. 2590 input#15,a:ifa<20then2680
  199. 2605 print"[196][201][211][203] [197][210][210][207][210]!!!  [208]lease check your drive"
  200. 2620 print"and then press the space bar."
  201. 2635 geta$:ifa$=""then2635
  202. 2650 ifa$<>chr$(32)then2635
  203. 2665 close15:close1:goto2455
  204. 2680 print#1,nc
  205. 2695 fort=1tonc:fory=1to4:print#1,c$(t,y):nexty:nextt
  206. 2710 close15:close1:return
  207. 2725 rem   *** view cards ***
  208. 2740 gosub460:printtab(13)"[159][214]iew [195]ards"
  209. 2755 print:print"[152][196]o you want them on the [155][211][152]creen or the"
  210. 2770 print"[155][208][152]rinter? ([211]/[208]/[210]): [155]";
  211. 2785 geta$:ifa$=""then2785
  212. 2800 ifa$="s"thenprint"[211]creen":goto3145
  213. 2815 ifa$="r"thenprint"[210]eturn":fort=1to250:nextt:return
  214. 2830 ifa$<>"p"then2785
  215. 2845 rem   *** output to printer ***
  216. 2860 print"printer"
  217. 2875 poke780,2:poke782,0:sys828
  218. 2890 ifpeek(783)and1thenclose2:goto2920
  219. 2905 goto2965
  220. 2920 print"[155][208][210][201][206][212][197][210] [197][210][210][207][210]!!! [208]lease check your"
  221. 2935 print"paper supply and printer condition."
  222. 2950 gosub535:goto2725
  223. 2965 rem printer okay
  224. 2980 print#2,chr$(17);"*** [195]redit [195]ard [198]iler ***"
  225. 2995 print#2:print#2,up$;"[206]ame";spc(18);"[206]umber";spc(11);"[197]xp date";spc(3);
  226. 3010 print#2,up$;"[212]elephone"
  227. 3025 fort=1to60:print#2,"-";:nextt:print#2
  228. 3040 fort=1tonc
  229. 3055 print#2,up$;c$(t,1);spc(abs(20-len(c$(t,1))));c$(t,2);
  230. 3070 print#2,up$;spc(abs(20-len(c$(t,2))))c$(t,3);spc(abs(10-len(c$(t,3))));
  231. 3085 print#2,up$;c$(t,4)
  232. 3100 nextt
  233. 3115 fort=1to5:print#2:nextt:print#2,chr$(145)
  234. 3130 close2:return
  235. 3145 rem screen output
  236. 3160 gosub460:print"[152][213]se the up/down cursor key to scroll"
  237. 3175 print"the cards.  [208]ress '[210]' to return to the":print"menu."
  238. 3190 print:print
  239. 3205 c=1
  240. 3220 print"[155]";c$(c,1);" - [152]";c$(c,2):print
  241. 3235 printtab(len(c$(c,1))+3);c$(c,3);"   ";c$(c,4)
  242. 3250 print"[195]ommand:"
  243. 3265 geta$:ifa$=""then3265
  244. 3280 ifa$="r"thenreturn
  245. 3295 ifa$="[145]"andc<ncthenc=c+1
  246. 3310 ifa$=""andc>1thenc=c-1
  247. 3325 print"[145][145][145][145][145][145][145]":fort=1to3
  248. 3340 print"                                       ":nextt:print"[145][145][145][145]":goto3220
  249. 3355 rem get input
  250. 3370 poke204,0
  251. 3385 c=0:a$="":l$=""
  252. 3400 getl$:ifl$=""then3400
  253. 3415 ifl$=chr$(20)andc>0thenc=c-1:a$=left$(a$,c):printl$;:goto3400
  254. 3430 ifl$=chr$(13)thenprint" ":poke204,1:return
  255. 3445 ifl$<" "orl$>"[218]"then3400
  256. 3450 if l$>"_" and l$<"[193]" then 3400
  257. 3455 if c=24 then 3400
  258. 3460 a$=a$+l$:printl$;:c=c+1:l$="":goto3400
  259. 3475 rem print letter
  260. 3490 gosub460:printtab(13)"[159][208]rint [204]etter"
  261. 3505 print:print:print" [155][215]hich card did you lose?[152]":print
  262. 3520 fort=1tonc:ift/2=int(t/2)thenprinttab(22);t"[157]> ";c$(t,1):goto3550
  263. 3535 print"  ";t"[157]> ";c$(t,1);
  264. 3550 nextt:print:print:print" [155][206]umber- ";
  265. 3565 geta$:ifa$=""then3565
  266. 3580 ct=val(a$):ifct<1orct>ncthen3565
  267. 3595 print"[152]"ct
  268. 3610 print:print" [152][215]as this card [155][204][152]ost or [155][211][152]tolen?":print" (l/s)?"
  269. 3625 getsl$:ifsl$=""then3625
  270. 3640 ifsl$<>"l"andsl$<>"s"then3625
  271. 3655 gosub460:printtab(13)"[159][208]rint [204]etter":print
  272. 3670 print" [152][215]hat is your full name?":print" >[155]";:gosub3355:n1$=a$:print
  273. 3685 print" [152][193]lternate name?":print" >[155]";:gosub3355:n2$=a$:print
  274. 3700 print" [152][211]treet or [208][207] [194]ox address?":print" >[155]";:gosub3355:ad$=a$:print
  275. 3715 print" [152][195]ity?":print" >[155]";:gosub3355:ci$=a$
  276. 3730 print"[145][145]"tab(12)"[152][211]tate?":printtab(12)">[155]";:gosub3355:st$=a$
  277. 3745 print"[145][145]"tab(23)"[152][218]ip?":printtab(23)">[155]";:gosub3355:z$=a$:print
  278. 3760 print" [152][196]ate?":print" >[155]";:gosub3355:d$=a$
  279. 3775 print"[145][145]"tab(23)"[152][208]hone #?":printtab(23)">[155]";:gosub3355:pn$=a$:fort=1to500
  280. 3790 nextt
  281. 3805 gosub460:printtab(13)"[159][208]rint [204]etter":print:print
  282. 3820 print"[155] [212]ype '[210]' to return to menu or '[208]' to":print" print.":print" ([210]/[208])?"
  283. 3835 geta$:ifa$=""then3835
  284. 3850 ifa$="r"thengoto1555
  285. 3865 ifa$<>"p"then3835
  286. 3880 rem  print letter routine
  287. 3895 poke780,2:poke782,0:sys828
  288. 3910 ifpeek(783)and1thenclose2:goto3940
  289. 3925 goto3985
  290. 3940 print"[155][208][210][201][206][212][197][210] [197][210][210][207][210]!!! [208]lease check your"
  291. 3955 print"paper supply and printer condition."
  292. 3970 gosub535:goto3805
  293. 3985 rem printer okay
  294. 4000 fort=1to12:print#2:nextt
  295. 4015 print#2,up$;spc(10);n1$:ifn2$<>""thenprint#2,up$;spc(10);n2$
  296. 4030 print#2,up$;spc(10);ad$:print#2,up$;spc(10);ci$;", ";st$
  297. 4045 print#2,up$;spc(12+len(ci$));z$
  298. 4060 print#2,up$;spc(10);pn$:print#2
  299. 4075 print#2,up$;spc(10);d$
  300. 4090 fort=1to5:print#2:nextt:tb$="          "
  301. 4105 print#2,up$;tb$;"[196]ear [211]ir or [205]adam:":print#2
  302. 4120 print#2,up$;tb$;"     [210]ecently [201] called to inform you that my"
  303. 4135 print#2,up$;tb$;c$(ct,1);" card had been ";
  304. 4150 ifsl$="s"thenprint#2,up$;"stolen.  ";
  305. 4165 ifsl$="l"thenprint#2,up$;"lost.  ";
  306. 4180 print#2,up$;"[212]he number"
  307. 4195 print#2,up$;tb$;"is ";c$(ct,2);" with an expiration"
  308. 4210 print#2,up$;tb$;"date of ";c$(ct,3);".  [208]lease send replacement"
  309. 4225 print#2,up$;tb$;"cards for the name";:ifn2$<>""thenprint#2,up$;"s ";:goto4255
  310. 4240 print#2," ";
  311. 4255 print#2,up$;"listed above at your"
  312. 4270 print#2,up$;tb$;"earliest convenience.":print#2
  313. 4285 print#2,up$;tb$;"[212]hank you for your helpful service."
  314. 4300 fort=1to5:print#2:nextt
  315. 4315 print#2,up$;spc(10);"[210]espectfully,":fort=1to4:print#2:nextt
  316. 4330 print#2,up$;spc(10);n1$:close2:goto1555
  317. 4345 end
  318. 4360 rem   *** return to uptime ***
  319. 4375 sys (8*4096)
  320. 4390 data 85,85,85,85,85,85,85,85,85,85,127,245,85,255,253,87,255,255,87,255
  321. 4405 data 255,93,221,213,93,87,94,93,213,85,93,215,125,93,215,85,95,255,254,95
  322. 4420 data255,254,87,255,255,87,255,255,85,255,253,85,127,245,85,85,85,85,85,85
  323. 4435 data85,85,85,104
  324. 4450 data85,85,85,85,85,85,85,85,85,90,169,85,106,170,85,170,170,149,170,170
  325. 4465 data149,85,85,101,153,166,101,153,101,101,153,165,165,153,86,101,170,170
  326. 4480 data165,170,170,165,170,170,165,170,170,149,170,170,149,106,170,85,90
  327. 4495 data169,85,85,85,85,85,85,85,1
  328. 4510 data170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170
  329. 4525 data85,85,85,101,102,170,101,101,101,101,101,101,101,101,101,105,165,101
  330. 4540 data90,149,101,86,86,170,85,85,85,255,255,255,255,255,255,255,255,255,255
  331. 4555 data255,255,255,255,255,255,255,255,104
  332. 4570 data170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170
  333. 4585 data85,85,85,90,150,165,101,86,101,101,90,105,90,90,169,85,153,89,85,153
  334. 4600 data89,106,89,89,85,85,85,255,255,255,255,255,255,255,255,255,255,255,255
  335. 4615 data255,255,255,255,255,255,104
  336.